package cn.sangyy.car.domain;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 存放车辆资源信息的-图片,视频,音频等
 * </p>
 *
 * @author sangyangyang
 * @since 2023-05-26
 */
@TableName("t_car_car_resources")
public class CarResources extends Model<CarResources> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField("car_id")
    private Long carId;
    /**
     * 资源的路径
     */
    @TableField("resource_url")
    private String resourceUrl;
    /**
     * 1=主图 2=副图 3=更多图片 4=视频
     */
    private Integer type;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCarId() {
        return carId;
    }

    public void setCarId(Long carId) {
        this.carId = carId;
    }

    public String getResourceUrl() {
        return resourceUrl;
    }

    public void setResourceUrl(String resourceUrl) {
        this.resourceUrl = resourceUrl;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "CarResources{" +
        ", id=" + id +
        ", carId=" + carId +
        ", resourceUrl=" + resourceUrl +
        ", type=" + type +
        "}";
    }
}
